package com.exam.role.model;

import java.util.List;

import com.exam.util.Constants;

public class User {
	public String uname;
	public String pwd;
	private String name;
	public String userType;
	public Role role;
	public List<Module> menus;
	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public String getUserType() {
		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}

	public String getUname() {
		return uname;
	}

	public void setUname(String uname) {
		this.uname = uname;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public boolean isStudent() {
		return Constants.Role.STUDENT.equals(userType);
	}

	public boolean isTeacher() {
		return Constants.Role.TEACHER.equals(userType);
	}

	public List<Module> getMenus() {
		return menus;
	}

	public void setMenus(List<Module> menus) {
		this.menus = menus;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
